package servlet;

import http.Request;
import http.Response;

public abstract class Servlet {
	public void service(Request request,Response response)throws Exception{
		if("GET".equals(request.getUrl())){
			doGet(request, response);
		}else{
			doPost(request, response);
		}
	}
	
	public abstract void doGet(Request request,Response response)throws Exception;
	
	public abstract void doPost(Request request,Response response)throws Exception;
}
